Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

280 add documentdb interoperability #359

Merged
merged 16 commits into from
Jan 13, 2025

Conversation

elucchesileon
Copy link

Remove the use of $facet and $count aggregation pipeline operators, which are unsupported in Amazon DocumentDB.

@elucchesileon elucchesileon requested a review from seansica January 8, 2025 15:37
@elucchesileon elucchesileon self-assigned this Jan 8, 2025
Ran `npm-check-updates -u` to bump all dependencies.

Explicitly installed mongoose@7x. Per the Mongoose documentation, we must upgrade to 7x before we can upgrade to 8x.
This is a preemptive change for Mongoose 8x.

In Mongoose 7, findOneAndRemove() was an alias for findOneAndDelete() that Mongoose supported for backwards compatibility. Mongoose 8 no longer supports findOneAndRemove(). Use findOneAndDelete() instead.
seansica and others added 10 commits January 13, 2025 09:36
The .eslintrc.yml style configuration is no longer supported in ESLint 9x. Migrated to eslint.config.js JavaScript based config.

This upgrade obfuscates many in-line eslint directives that were previously in use. In particular, there were a lot of 'no-await-in-loop' disable directives that can be/have been removed.
Resolves no-unused-vars linting error
- Refactoring into a sub-package to break up the code into smaller modules
- Replacing all callbacks with promises
- Breaking up code chunks into functions that are easier to read
- Consolidating shared components in bundle-helper module
This function was previously defined and called within the collection-bundles.service. It is now split into two functions:
- addNotes: available in the service layer
- retrieveAllActiveNotes: available in the repository layer

All functionality is the same.
- nanoid: 5x --> 3x
- openid-client: 6x --> 5x
- mongoose: 7x --> 6x

Both of these dependencies have moved to ESM in their latest respective revision, meaning that we can no longer import them using the standard CommonJS syntax.

NanoID outlines a solution involving dynamic imports. Luckily nanoid@3 is still actively supported, so this change will be handled in a future revision.

All regression tests are passing.
We can remove the old collection-bundles-service.js module now that its been refactored into a sub-package (See: services/collection-bundles-service/index.js)
@seansica seansica merged commit 7ee03dd into project-orion Jan 13, 2025
1 check failed
@seansica seansica deleted the 280-add-documentdb-interoperability branch January 13, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants